using System;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;
using System.Data.Entity.ModelConfiguration.Configuration;
using ESoft.Core.DAO;
using ESoft.Core.Model;

namespace ESoft.Domain.Entity
{
    /// <summary>
    /// Product
    /// </summary>    
	[Table("product")]
    public partial class ProductEntity : BaseFakeModel<String>
    {		    
        /// <summary>
        /// 排序
        /// </summary>
		[Column("product_order")]
        public int? ProductOrder { get; set; }
    
        /// <summary>
        /// 产品名称
        /// </summary>
		[Column("product_name")]
        public string ProductName { get; set; }
    
        /// <summary>
        /// 类别id
        /// </summary>
		[Column("category_id")]
        public string CategoryId { get; set; }
    
        /// <summary>
        /// 是否上架
        /// </summary>
		[Column("is_sold")]
        public bool IsSold { get; set; }
    
        /// <summary>
        /// 是否置顶
        /// </summary>
		[Column("is_top")]
        public bool? IsTop { get; set; }
    
        /// <summary>
        /// 图片路径
        /// </summary>
		[Column("image_id")]
        public string ImageId { get; set; }
    
        /// <summary>
        /// 单价
        /// </summary>
		[Column("unit_price")]
        public decimal? UnitPrice { get; set; }
    
        /// <summary>
        /// 备注
        /// </summary>
		[Column("description")]
        public string Description { get; set; }
    
        /// <summary>
        /// 优惠规则ID
        /// </summary>
		[Column("rebate_id")]
        public string RebateId { get; set; }
    
        /// <summary>
        /// 单位id
        /// </summary>
		[Column("unit_id")]
        public string UnitId { get; set; }
    
        /// <summary>
        /// 店铺ID
        /// </summary>
		[Column("shop_id")]
        public string ShopId { get; set; }
    
        /// <summary>
        /// 
        /// </summary>
		[Column("create_time")]
        public DateTime? CreateTime { get; set; }
    }

	public class ProductEntityRegstHelper : IEntityMapper
    {
        public void RegistTo(ConfigurationRegistrar configurations)
        {
            configurations.Add<ProductEntity>(new EntityTypeConfiguration<ProductEntity>());
        }
    }
}

